package ai.people.netmon.framework.exception.enums;

/**
 * 档案异常枚举
 *
 * @author yuanqinglong
 * @date 2022/2/15 17:16
 */
public enum WorkOrderExceptionEnum implements ExceptionEnum{
    /**
     * 工单已终止或完成
     */
    WORK_ORDER_IS_STOP(false, 900000, "工单已终止或完成！"),
    WORK_ORDER_IS_ACCEPT(false, 900001, "工单已受理！"),
    WORK_ORDER_NOT_ACCEPT(false, 900002, "工单还未受理，请先受理工单"),
    WORK_ORDER_NOT_ACCEPTOR(false, 900003, "非受理工单操作人"),
    WORK_ORDER_NOT_OPERATOR(false, 900003, "非工单操作人"),
    ;


    /**
     * 状态
     */
    final boolean status;
    /**
     * 代码
     */
    final int code;
    /**
     * 消息
     */
    final String message;

    WorkOrderExceptionEnum(boolean status, int code, String message) {
        this.status = status;
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public boolean getStatus() {
        return status;
    }
}
